﻿@using System.Linq
@model System.Collections.Generic.IEnumerable<Citi.HeadCount.WebUI.Models.TypeRuleResultViewModel>
<script type="text/javascript">
        $(function () {
            if ($("#RuleResultIdParent").val() > 0) {
                $(".hiddenRuleResultId").val($("#RuleResultIdParent").val());
            }
            
            @{
                if (Model != null && Model.Any())
                {
                <text>$(".hiddenRuleResultId").val(@Model.First().RuleResultId);</text>
                }
            }
        });
</script>
<table id="tableRules" width="100%">
    <tr>
        <th>
            Column Name
        </th>
        <th>
            Value
        </th>
    </tr>
    @{
        if (Model != null)
        {
            foreach (var item in Model)
            {
        <tr>
            <td>
                @item.TypeResult
            </td>
            <td>
                @item.TypeResultValue
            </td>
        </tr>
            }
        }
    }
</table>
